package com.sanbi.erp.api.web;

import com.sanbi.erp.api.vo.ResponseVo;
import com.sanbi.erp.db.domain.Platform;
import com.sanbi.erp.db.service.PlatformService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @introduce: 平台服务
 * @Date: 2022/10/18 23:16
 * @Author: XYP
 */
@Validated
@RestController
@RequestMapping("/erp/platform")
public class ErpPlatformController {
    @Resource
    PlatformService platformService;

    /**
     * 获取所有平台和它下面的所有店铺信息
     * @return
     */
    @GetMapping("/getList")
    public ResponseVo<List<Platform>> getList(){
        return ResponseVo.ok(this.platformService.selectByLink());
    }
}
